CC=gcc
CXX=g++

CFLAGS=-m32
CXXFLAGS=-m32

INCLUDES=
LDFLAGS=-m32

SRCS_cpp=waitpid.cpp
OBJS=$(SRCS_cpp:.cpp=.o)
SRCS_c=$(wildcard *.c)
OBJS+=$(SRCS_c:.c=.o)

OUT=out


$(OUT) : $(OBJS)
	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJS) -o $(OUT)

%.o : %.cpp
	$(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@

%.o : %.c
	$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@

clean :
	@rm -f *.o $(OUT)
	@echo all cleaned

.PHONY : clean
